 				 
 
		 **************************************************************
		 **															 **
		 ** Paper: Freedom of Foreign Movement and Human Trafficking **
		 **														     **
		 ** Authors: Sam R. Bell & Richard W. Frank 				 **
		 **															 **
		 ** Date: May 11, 2021										 **
		 **															 **
		 ** Task: Figure A7-Country-years included in Models 1 & 2 	 **
		 **															 **
		 **************************************************************
 
											 
		 clear
		 version 16.1
		 set seed 1234
		 
		** change working directory
		cd "~"
	  
		use "ht_merged.dta"
		merge 1:1 ccode year using "ht_eba_ivs.dta"
		eststo clear	 
		gen homi =ln(homicides)
		global IVs "gdp_ln pop_ln " 
		sort ccode year
		tsset ccode year
			
		probit F.source fm W_fm_con12   $IVs , robust cluster (ccode) 
			
		gen included=0
		replace included=1 if e(sample)
		keep if included==1	 
		keep country year included ccode
		replace country="Cote d'Ivoire" if country=="Cote D'Ivoire"
		replace country="Equatorial Guinea" if country=="Equatorial Quinea"	
		by ccode: gen first=1 if _n==1
		by ccode: gen last=1 if _n==_N	
		replace first=year if first==1
		replace last=year if last==1
			
		collapse (first) country (max)  first last, by(ccode)
			 
		gen start=first+1
		gen finish=last+1
			 
		graph dot start finish, over(country) ylabel(2000(2)2012, labsize(small)) ///
			exclude0 xsize(8) ysize(16) linetype(line) lines(lwidth(vvthin)) legend(off)
			  
			  
			  
			   
